package com.happycat.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;

/**
 * @Author shenbin
 * @CreatedDate 2020-09-09
 * @Modified By:
 */
@Data
@ApiModel(value = "LoginParam", description = "登录参数")
public class LoginParam {
//    @ApiModelProperty(value = "验证码KEY")
//    private String key;

    @ApiModelProperty(value = "验证码")
    private String code;

//    @ApiModelProperty(value = "企业编号", example = "0000")
//    private String tenant;
    @ApiModelProperty(value = "账号/手机号")
    private String account;

    @ApiModelProperty(value = "密码")
    private String password;

    /**
     * password: 账号密码
     * refresh_token: 刷新token
     * captcha: 验证码
     */
    @ApiModelProperty(value = "授权类型", example = "captcha", allowableValues = "captcha,refresh_token,password")
    @NotEmpty(message = "授权类型不能为空")
    private String grantType;

    /**
     * 前端界面点击清空缓存时调用
     */
    @ApiModelProperty(value = "刷新token")
    private String refreshToken;
}
